package com.sqsf.Mapper;

import com.sqsf.javabean.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface UserMapper {
    //@Select("select * from users where username=#{username} and password=#{password} and status=1")
    User selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    List<User> selectUser_Role();
    User selectUser_RoleById(int id);

    int insert(User user);
    @Insert("insert into users_role (userId,roleId) values(#{uid},#{rid})")
    int insertU_R(@Param("uid") int uid,@Param("rid") int rid);

    List<User> selectAll();

    List<User> selectAllUsers();

    int insertUser(User user);
}
